n=3
def isPowerOfTwo(n: int) -> bool:
    while(n>=1):
        if n==1:
            return True
        if int(n)%2!=0:
            return False
        n=int(n)/2
    return False

def isPowerOfTwo1(n):
    return n>0 and n&(n-1)==0
print(isPowerOfTwo1(n))